*******************************************************************************************
*******************************************************************************************
******************** Reclassification Risk in the Small Group Health Insurance Market
******************* by Sebastian Fleitas, Gautam Gowrisankaran and Anthony Lo Sasso 
*******************************************************************************************
*******************************************************************************************
*******************************************************************************************
******************** Table C7
*******************************************************************************************
*******************************************************************************************
*******************************************************************************************
 

cd "~/Dropbox/ReclassificationRisk/"
*cd "/Volumes/PUC_Dropbox_Seba/Dropbox/ReclassificationRisk"

use database_individual_level.dta, replace 
do Restat_Table6_USICcorrection_splines.do 

set more off

*keep if year==2013 | year==2014
reghdfe mean_premium mean_pred_riskscore_rp yeardum* if sample==1 , absorb(mbr_sys_id) vce(cluster customer_number year)
reghdfe mean_premium mean_pred_riskscore_rp prob_leaving* yeardum* if sample==1 , absorb(mbr_sys_id) vce(cluster customer_number year)
*save aux_todrop_forSE.dta, replace


*********************************************************************************************
**** TABLE WE HAVE IN THE RESPONSES 
*********************************************************************************************
reghdfe   mean_premium mean_pred_riskscore_rp if sample==1 & (year==2013 | year==2014), absorb(mbr_sys_id) vce(cluster customer_number year)
reg     D.mean_premium D.mean_pred_riskscore_rp if sample==1 & (year==2013 | year==2014), noconst vce(cluster customer_number) 
reg     D.mean_premium D.mean_pred_riskscore_rp yeardum* D.prob_leaving if sample==1 & (year==2013 | year==2014), noconst vce(cluster customer_number) 
reg     D.mean_premium D.mean_pred_riskscore_rp yeardum* D.prob_leaving* if sample==1 & (year==2013 | year==2014), noconst vce(cluster customer_number) 
*********************************************************************************************

exit
